/*
********************************************************************************
* Copyright (C) 2021, xiang.D <dx_65535@163.com>.
* All right reserved.
*
* File Name   : led_factory.h
* Author      :
* Version     : V1.0
* Description :
* Journal     : 2021-01-15 init v1.0
* Brief       : Blog: https://blog.csdn.net/qq_38750572?spm=1001.2014.3001.5343
* Others      :
********************************************************************************
*/
#ifndef __LED_FACTORY_H__
#define __LED_FACTORY_H__

#include <map>
#include "led.h"

class CLedFactory
{
public:
    static CLedFactory* GetInstance();

    CLed* GetLed(EPermission permission, EUsedMode mode = LED_MODE_DEFAULT, int freq = 10);

private:
    std::map<int, CLed *> mLedTable;
    CLedFactory() {}                ///< 单例模式
    ~CLedFactory() {}
};

#endif
